<?php

$file_1 = fopen("./country_numeric.txt","r");

while(! feof($file_1))
{
	$one_line = fgets($file_1);
	$id = substr($one_line,0,3);
	$name = substr($one_line,4);
	$name=trim($name);
	echo $id.';'.$name.';';
	$file_2 = fopen("./country_codes.txt","r");
	while(! feof($file_2))
	{
		$one_line_2 = fgets($file_2);
		$array_1 = explode(';',$one_line_2);
		if(strtolower($array_1[0])==strtolower($name))
		{
			echo trim($array_1[1])."<br />\n";
		}
	}
	fclose($file_2);
	//echo $one_line.'<br />';
}
fclose($file_1);


?>